From: Paul Eggert Date: Mon, 14 Mar 2011 22:56:24 +0000 (-0700) Subject: * sysdep.c: Fix pointer signedness issue. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~4366^2~100 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=890511b8a22a4baf4fb32131cf7f6f6b5f2c9fc2;p=emacs.git * sysdep.c: Fix pointer signedness issue. --- diff --git a/src/ChangeLog b/src/ChangeLog index 819799a0895..3c2a1e047dc 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2011-03-14 Paul Eggert * sysdep.c (system_process_attributes): Rename vars to avoid shadowing. + Fix pointer signedness issue. * process.c (serial_open, serial_configure): Move decls from here ... * systty.h: ... to here, so that they can be checked. diff --git a/src/sysdep.c b/src/sysdep.c index b8fbf863074..e19f9ca829e 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -2845,8 +2845,10 @@ system_process_attributes (Lisp_Object pid) fd = emacs_open (fn, O_RDONLY, 0); if (fd >= 0) { - for (cmdline_size = 0; emacs_read (fd, &c, 1) == 1; cmdline_size++) + char ch; + for (cmdline_size = 0; emacs_read (fd, &ch, 1) == 1; cmdline_size++) { + c = ch; if (isspace (c) || c == '\\') cmdline_size++; /* for later quoting, see below */ }